package com.cloud.xtools.user.service.admin;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloud.xtools.common.response.PageList;
import com.cloud.xtools.user.domain.entity.Role;
import com.cloud.xtools.user.domain.query.admin.RoleQuery;
import com.cloud.xtools.user.domain.request.admin.RoleCreateRequest;
import com.cloud.xtools.user.domain.request.admin.RoleUpdateRequest;
import com.cloud.xtools.user.domain.resource.admin.RoleResource;

import java.util.List;

/**
 * @author Daixinguo
 */
public interface RoleService extends IService<Role> {
    Long countByIds(List<Long> roleIds);

    PageList list(RoleQuery roleQuery);

    // 添加
    RoleResource add(RoleCreateRequest roleCreateRequest);

    // 编辑
    void edit(Long id, RoleUpdateRequest roleUpdateRequest);

    // 删除
    void destroy(Long id);

    // 分配权限
    void assignPermission(Long id, List<Long> permissionIds);
}
